Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes TGUI transfer over when changing bodies #5388

Merged
merged 5 commits into from
Jan 18, 2024

Conversation

SabreML
Copy link
Member

@SabreML SabreML commented Jan 6, 2024

About the pull request

Makes any open TGUI windows transfer over when a player's mind is transferred to a new body. (At least if it's done through /datum/mind/proc/transfer_to())
This is mainly useful for xeno players who want to evolve, since it means they won't need to re-open any interfaces they had open.

The changes in code/controllers/subsystem/minimap.dm are there so that the tacmap image remains visible to the player after a transfer, since the client changing bodies seems to remove it from their screen list.

(This could have hidden side effects of interfaces staying open when they shouldn't, so I'd appreciate this being testmerged for a bit just in case.)

Explain why it's good for the game

QOL addition so that you don't have to manually re-open them yourself.

Testing Photographs and Procedure

Screenshots & Videos
dreamseeker_VeVGT1te1q-output.mp4

Changelog

🆑
qol: Made open TGUI windows transfer over when a xeno player evolves.
/:cl:

@github-actions github-actions bot added the Quality of Life Make the game harder to play label Jan 6, 2024
@fira
Copy link
Member

fira commented Jan 6, 2024

Noticed that before, I think this should just flat out be in transfer_to. Even NanoUI has UI transfer already there, it just never was done for TGUI, unless there's some obscure reason it doesn't work...

@SabreML
Copy link
Member Author

SabreML commented Jan 7, 2024

Noticed that before, I think this should just flat out be in transfer_to. Even NanoUI has UI transfer already there, it just never was done for TGUI, unless there's some obscure reason it doesn't work...

It probably would be better to try that instead, although I'm not sure how I could check for an open tacmap from /datum/mind instead of /mob/living/carbon/xenomorph. (The map needs to be re-registered, otherwise the ui just shows a black screen where it should be.)

@fira
Copy link
Member

fira commented Jan 8, 2024

Could hook COMSIG_MOB_NEW_MIND

This reverts commit 1bd78fe.
Using the `COMSIG_MIND_TRANSFERRED` signal here (stolen from TG of course) rather than `COMSIG_MOB_NEW_MIND` so that the UI doesn't need to unregister from the old body and re-register with the new one.
@SabreML SabreML changed the title Makes TGUI transfer over on evolve Makes TGUI transfer over when changing bodies Jan 9, 2024
@SabreML
Copy link
Member Author

SabreML commented Jan 9, 2024

I've rewritten the PR in the latest commit with your suggestions since they made a lot of sense, and from some more testing it all seems to be working the same. (The failed checks are from a github server error)

Copy link
Member

@harryob harryob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll see how it goes

@harryob harryob added this pull request to the merge queue Jan 18, 2024
Merged via the queue into cmss13-devs:master with commit 46cc269 Jan 18, 2024
26 checks passed
cm13-github added a commit that referenced this pull request Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Quality of Life Make the game harder to play
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants